#include "botconfig.h"
#include "linefollower.h"

#ifndef _GRID_FOLLOWER_H_
#define _GRID_FOLLOWER_H_



class GridFollower: public LineFollower
{
public:
  void gotoNode(int node);
  bool isIntersection();  //3 Possibilities
  void rotateDegrees(int angle);  //angle in degrees
  void attachGridSensor(int flsensor,int frsensor,int blsensor,int brsensor);
  void readGridSensor();
  void followGrid(int x,int y);
  GridFollower();
  
private:
  int x;
  int y;
  
  int flsensor;  //attachSensor in linefollower has to be changed to include new sensors
  int frsensor;
  int blsensor;
  int brsensor;
  
  bool lsensor3val;			//status of pin. in 0 or 1
  bool lsensor2val;
  bool lsensor1val;
  bool csensorval;
  bool rsensor1val;
  bool rsensor2val;
  bool rsensor3val;
  
  int noIntersect;
  int SensorStatus;
  byte Lsensor1,Lsensor2,Lsensor3;
  byte Rsensor1,Rsensor2,Rsensor3;
  byte PLsensor1,PLsensor2,PLsensor3;
  byte PRsensor1,PRsensor2,PRsensor3;
  int  Csensor,PCsensor;
  
  bool flag;
  bool flsensorval; 
  bool frsensorval;
  bool blsensorval;
  bool brsensorval;
  
  int ReadingCounts;
};
  
#endif
